package cn.gson.crm.controller;

import cn.gson.crm.model.pojos.Employee;
import cn.gson.crm.model.pojos.User;
import cn.gson.crm.model.service.CenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.servlet.ServletOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.UUID;

@Controller
@RequestMapping("/center")
public class CenterController {
    @Autowired
    CenterService centerService;

    @RequestMapping("/selectEmp")
    @ResponseBody
    public Map<String,Object> selectEmp(Integer ygId){
        return centerService.selectEmp(ygId);
    }

    @RequestMapping("/updateName")
    @ResponseBody
    public void updateName(String position){
        centerService.updateName(position);
    }

    @RequestMapping("/updatePwd")
    @ResponseBody
    public void updatePwd(String position){
        centerService.updatePwd(position);
    }

    @RequestMapping("/updateUser")
    @ResponseBody
    public void updateUser(@RequestBody User user){
        centerService.updateUser(user);
    }

}
